package cn.com.elite;

import javax.servlet.http.HttpServlet;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class RSServlet extends HttpServlet{
	private static final Log log=LogFactory.getLog(RSServlet.class);
	public void init(){
		try{
			log.info("-------------------------RSServlet---------------------------------");
//			System.out.println("-------------------------RSServlet---------------------------------");
			RSThread rs=new RSThread();
			rs.setIp(this.getInitParameter("IP"));
			rs.setPort(this.getInitParameter("PORT"));
			rs.setUsername(this.getInitParameter("USERNAME"));
			rs.setPassword(this.getInitParameter("PASSWORD"));
			rs.setDotime(this.getInitParameter("DOTIME"));
			rs.setFilename(this.getInitParameter("FILENAME"));
			rs.setSqlname(this.getInitParameter("SQLNAME"));
			rs.setResult(this.getInitParameter("RESULT"));		
			rs.setSqlname1(this.getInitParameter("SQLNAME1"));	
			rs.setPath(this.getInitParameter("PATH"));	
			rs.setInsertSql(this.getInitParameter("InsertSql"));
			rs.setEXCEL_DATE(this.getInitParameter("EXCEL_DATE"));
			rs.setInsert_content(this.getInitParameter("insert_content"));
			rs.setInsert_type(this.getInitParameter("insert_type"));
			Thread t=new Thread(rs); 
	        t.start(); 
		}catch(Exception e){
			log.error("RSServlet启动失败:"+EliteUtil.getERRO(e));  
		}
		
		
	}

}
